﻿@{
    Layout = "~/Areas/Admin/Views/Shared/_LayoutCMS.cshtml";
    ViewBag.Title = "栏目信息操作";
}

@section htmlhead{
    <link href="~/Content/assets/css/Layout/css/main.css" rel="stylesheet" />
    <link href="~/Content/assets/css/plugin/validator.css" rel="stylesheet" />
}
@model LY.Entity.C_Menu
<div class="container">

    <div id="forms" class="mt10">
        <div class="box">
            <div class="box_border">
                <div class="box_top"><b class="pl15">栏目信息操作</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;带“ <span style="color: red">*</span> ”标示为必填项</div>

                <div class="box_center">
                    <form  id="frmEdit" method="post" action="@Url.Action("MenuSave")" role="form" class="jqtransform">
                        <input id="hideId" name="Id" value="@Model.ID" type="hidden" />
                        <input id="UpperID" name="UpperID" value="@Model.UpperID" type="hidden" />

                        <table class="form_table pt15 pb15" style="width: 100%;" border="0">
                            <tr>
                                <td class="td_right"><span style="color: red">*</span>&nbsp;栏目名称：</td>
                                <td class="">
                                    <input type="text" id="Name" name="Name" value="@Model.Name" class="input-text lh30" size="40" placeholder="请输入栏目名称">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">栏目副标题：</td>
                                <td class="">
                                    <input type="text" id="NameE" name="NameE" value="@Model.NameE" onblur="util.GetNameE(this.id,this.value)" class="input-text lh30" size="40">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right"><span style="color: red">*</span>&nbsp;栏目Code：</td>
                                <td class="">
                                    <input type="text" id="Code" name="Code" value="@Model.Code" class="input-text lh30" size="40" placeholder="请输入栏目Code">&nbsp;输入规则：<span style="color: red">请尽量以栏目中文名称首字母大写</span>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">排序：</td>
                                <td class="">
                                    <input type="text" id="Sequence"  name="Sequence" class="input-text lh30" size="40"  value="@Model.Sequence" onblur="util.GetSequence(this.id,this.value)" />&nbsp;输入规则：<span style="color: red">必须为整数数字格式, 默认值为‘ 0 ’</span>
                                    <input type="hidden" id="Path" name="Path" value="@Model.Path">

                                </td>
                            </tr>
                            <tr>
                                <td class="td_right"><span style="color: red">*</span>&nbsp;栏目隶属：</td>
                                <td class="">
                                    @*<input type="text" id="lbMenu" readonly="readonly" name="UpperName" placeholder="请选择栏目隶属"  value="@Model.UpperName" style="text-decoration-style:dashed "/><input type="button" onclick="util.GetParentName()" id="btnAdd" name="button" class="btn btn82 btn_add" value="+">*@
                              @Html.ResourceDropDownList("UpperIDtree", "MenuTree", @Model.UpperID, new { @class = "wh160 select" })

                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">栏目状态：</td>
                                <td class="">
                                    @Html.ResourceRadioList("Status", "AuditStatus", Model.Status == null ? 0 : Model.Status, true)
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">栏目链接：</td>
                                <td class="">
                                    <input type="text" id="URL" name="URL" value="@Model.URL" class="input-text lh30" size="40">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">&nbsp;</td>
                                <td class="">
                                    <input type="button" id="btnSave" name="button" class="btn btn82 btn_save2" value="保存">
                                    <input type="button" id="btnReturn" name="button" class="btn btn82 btn_res" value="返回">
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<input id="Menu" name="Menu" value="" type="hidden" />
@section jssection{
    <script type="text/javascript">
        var util = {};
        var options = {
            MenuTreeUrl: "@Url.Action("MenuTree")"
        };

        var submenuid = '@ViewBag.SubMenuId'.split(",");
        for (var i = 0; i < submenuid.length; i++) {
            $("#UpperIDtree option[value='" + submenuid[i] + "']").remove();
        }
    </script>
 
    <script src="~/Content/assets/plugins/validator/validator.js"></script>
    <script src="~/Content/assets/js/common.js"></script>
    <script src="~/Content/assets/layer/layer.min.js"></script>
    <script src="~/Content/assets/app/menu/menuedit.js"></script>
}